﻿CREATE TABLE [dbo].[L_Reimbursement] (
    [id]              INT             IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [Summary]         NVARCHAR (100)  CONSTRAINT [DF_L_Reimbursement_Summary_1] DEFAULT ('') NULL,
    [CompanyId]       INT             CONSTRAINT [DF_L_Reimbursement_CompanyId] DEFAULT ((0)) NULL,
    [CompanyName]     NVARCHAR (100)  CONSTRAINT [DF_L_Reimbursement_CompanyName] DEFAULT ('') NULL,
    [DepartmentId]    INT             CONSTRAINT [DF_L_Reimbursement_DepartmentId] DEFAULT ((0)) NULL,
    [DepartmentName]  NVARCHAR (100)  CONSTRAINT [DF_L_Reimbursement_DepartmentName] DEFAULT ('') NULL,
    [ENameId]         VARCHAR (10)    CONSTRAINT [DF_L_Reimbursement_ENameId] DEFAULT ((0)) NULL,
    [EName]           NVARCHAR (10)   CONSTRAINT [DF_L_Reimbursement_EName] DEFAULT ('') NULL,
    [Money]           DECIMAL (18, 2) CONSTRAINT [DF_L_Reimbursement_Money] DEFAULT ((0)) NULL,
    [PZflag]          INT             CONSTRAINT [DF_L_Reimbursement_PZflag] DEFAULT ((0)) NULL,
    [PZPerson]        VARCHAR (10)    CONSTRAINT [DF_L_Reimbursement_PZPerson] DEFAULT ('') NULL,
    [PZPersonName]    NVARCHAR (10)   CONSTRAINT [DF_L_Reimbursement_PZPersonName] DEFAULT ('') NULL,
    [PZYJ]            NVARCHAR (500)  CONSTRAINT [DF_L_Reimbursement_PZYJ] DEFAULT ('') NULL,
    [PZRQ]            DATETIME        NULL,
    [PZflag1]         INT             CONSTRAINT [DF_L_Reimbursement_PZflag1] DEFAULT ((0)) NULL,
    [PZPerson1]       VARCHAR (10)    CONSTRAINT [DF_L_Reimbursement_PZPerson1] DEFAULT ('') NULL,
    [PZPersonName1]   NVARCHAR (10)   CONSTRAINT [DF_L_Reimbursement_PZPersonName1] DEFAULT ('') NULL,
    [PZYJ1]           NVARCHAR (500)  CONSTRAINT [DF_L_Reimbursement_PZYJ1] DEFAULT ('') NULL,
    [PZRQ1]           DATETIME        NULL,
    [SHflag]          INT             CONSTRAINT [DF_L_Reimbursement_SHflag] DEFAULT ((0)) NULL,
    [SHPerson]        VARCHAR (10)    CONSTRAINT [DF_L_Reimbursement_SHPerson] DEFAULT ('') NULL,
    [SHPersonName]    NVARCHAR (10)   CONSTRAINT [DF_L_Reimbursement_SHPersonName] DEFAULT ('') NULL,
    [SHYJ]            NVARCHAR (500)  CONSTRAINT [DF_L_Reimbursement_SHYJ] DEFAULT ('') NULL,
    [SHRQ]            DATETIME        NULL,
    [Memo]            NVARCHAR (4000) CONSTRAINT [DF_L_Reimbursement_Memo] DEFAULT ('') NULL,
    [lrrq]            DATETIME        CONSTRAINT [DF_L_Reimbursement_lrrq] DEFAULT (getdate()) NULL,
    [userid]          VARCHAR (10)    CONSTRAINT [DF_L_Reimbursement_userid] DEFAULT ('') NULL,
    [username]        NVARCHAR (10)   CONSTRAINT [DF_L_Reimbursement_username] DEFAULT ('') NULL,
    [BXflag]          INT             CONSTRAINT [DF_L_Reimbursement_HKflag] DEFAULT ((0)) NULL,
    [BXJE]            DECIMAL (18, 2) CONSTRAINT [DF_L_Reimbursement_HKJE] DEFAULT ((0)) NULL,
    [BXLoanId]        VARCHAR (50)    CONSTRAINT [DF_L_Reimbursement_LoanId] DEFAULT ('') NULL,
    [FKflag]          INT             CONSTRAINT [DF_L_Reimbursement_FKflag] DEFAULT ((0)) NULL,
    [FKJE]            DECIMAL (18, 2) CONSTRAINT [DF_L_Reimbursement_FKJE] DEFAULT ((0)) NULL,
    [FKLoanId]        VARCHAR (50)    CONSTRAINT [DF_L_Reimbursement_FKLoanId] DEFAULT ('') NULL,
    [HKflag]          INT             CONSTRAINT [DF_L_Reimbursement_HKflag_1] DEFAULT ((0)) NULL,
    [HKJE]            DECIMAL (18, 2) CONSTRAINT [DF_L_Reimbursement_HKJE_1] DEFAULT ((0)) NULL,
    [flag]            INT             CONSTRAINT [DF_L_Reimbursement_flag] DEFAULT ((0)) NULL,
    [PaymentTypeId]   INT             NULL,
    [PaymentTypeName] NVARCHAR (50)   NULL,
    [BankId]          INT             NULL,
    [BankName]        NVARCHAR (50)   NULL,
    CONSTRAINT [PK_L_Reimbursement] PRIMARY KEY CLUSTERED ([id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'摘要', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'Summary';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'申请单位ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'CompanyId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'申请单位名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'CompanyName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'申请部门ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'DepartmentId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'申请部门名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'DepartmentName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'申请人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'ENameId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'申请人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'EName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'Money';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批标识（0：未审，1：通过，-1：驳回）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZflag';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'批准人编号(要报销人的上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZPerson';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'批准人姓名(要报销人的上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZPersonName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批意见(要报销人的上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZYJ';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批日期(要报销人的上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZRQ';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批标识（0：未审，1：通过，-1：驳回）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZflag1';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'批准人编号(整个事件上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZPerson1';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'批准人姓名(整个事件上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZPersonName1';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批意见(整个事件上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZYJ1';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批日期(整个事件上级领导)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'PZRQ1';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务确认标志（0：未确认，1：确认通过，-1：驳回）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'SHflag';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务审核人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'SHPerson';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务审核人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'SHPersonName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务审核意见', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'SHYJ';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务审核日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'SHRQ';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'Memo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'lrrq';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入人编号（经办人）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'userid';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入人姓名（经办人）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'username';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'报销类别（1：现金，2：支票，3：借条）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'BXflag';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'报销金额（当类别为现金和支票时）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'BXJE';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'关联的借条ID(报销)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'BXLoanId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'负款标识（0：无负款，1：现金，2：支票，3：借条）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'FKflag';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'负款金额（当负款为现金或支票时填）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'FKJE';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'负款对应的借条ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'FKLoanId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'还款标识（0：无还款，1：现金，2：支票）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'HKflag';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'还款金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'HKJE';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'报销申请 状态 0，待审 -1，驳回 1，通过', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement', @level2type = N'COLUMN', @level2name = N'flag';

